package cn.springbook.common.core.config.auto;

import cn.springbook.common.core.config.GlobalExceptionHandler;
import cn.springbook.common.core.config.mybatis.MyMetaObjectHandler;
import cn.springbook.common.core.config.mybatis.MybatisPlusConfig;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * <p>
 *
 * </p>
 *
 * @author: caifenglin
 * @date: 2021/7/7 10:59
 */
@Configuration
public class MybatisPlusAutoConfig {

    @Bean
    @ConditionalOnMissingBean
    public MybatisPlusConfig mybatisPlusConfig(){
        return new MybatisPlusConfig();
    }

    @Bean
    @ConditionalOnMissingBean
    public MyMetaObjectHandler myMetaObjectHandler(){
        return new MyMetaObjectHandler();
    }
}
